﻿<UserControl x:Class="BadHabit.Factory.Controls.ReportToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Loaded="UserControl_Loaded"
    >
    <UserControl.Resources>

        <DataTemplate x:Key="ReportTemplate">
            <Border Style="{StaticResource HighLightBorder}" Margin="0,0,10,0" VerticalAlignment="Stretch">
                <TextBlock Text="{Binding}"/>
            </Border>
        </DataTemplate>

    </UserControl.Resources>
    
    
    <!-- FILTER -->
           
        <ToolBar
            HorizontalAlignment="Stretch"
            ToolBarTray.IsLocked="True"
            Background="Transparent">
            
            <ListBox x:Name="reportTypeListBox"
                     MinWidth="100"
                     IsSynchronizedWithCurrentItem="True"
                     SelectionChanged="reportTypeListBox_SelectionChanged"
                     Background="Transparent"
                     BorderThickness="0"
                     ItemTemplate="{StaticResource ReportTemplate}"
                     HorizontalAlignment="Stretch"
                     VerticalAlignment="Stretch"
                     >
                <ListBox.Style>
                    <Style TargetType="ListBox">
                        <Setter Property="ItemsPanel">
                            <Setter.Value>
                                <ItemsPanelTemplate>
                                    <WrapPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </ListBox.Style>
                <ListBox.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black"/>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="{StaticResource SelectedItemColor}"/>
                    <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="{StaticResource SelectedItemColor}"/>
                </ListBox.Resources>
            </ListBox>
            
            <Separator />

            <Button 
                Width="80"
                HorizontalAlignment="Right" VerticalAlignment="Center"
                Click="Print_Click"
                Style="{StaticResource ToolBarButton}">Print</Button>
            
        </ToolBar>
    
</UserControl>
